home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 April / Ahoy_Magazine_85-04_1985_Double_L.d64 / c64 booter (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  3KB  |  95 lines

  1. 0 rem 'c64 booter' copyright 1984 george jones * for c-64
  2. 1 clr:dv=peek(186)
  3. 2 bs%=692:fi%=512:cs%=93:sr%=735:rn%=733:lm%=702:po%=723:im%=770:mx=65535
  4. 3 s%=679:e%=771:poke808,234:rem disable run/stop restore
  5. 4 gosub62:rem title
  6. 5 gosub18:rem input disk,id & prog name string
  7. 6 gosub47:rem format disk
  8. 7 print"[147]":print"[144][212]he [194][207][207][212] will load and run the program"
  9. 8 print"";pn$;:print"[146][144] after you have saved it"
  10. 9 print"onto this disk."
  11. 10 printtab(6)" [212]o [210][213][206], type [204][207][193][196]";:printchr$(34)":*"chr$(34);:print",8,1"
  12. 11 close2:close15
  13. 12 print"[193]nother [194][207][207][212] ? (y/n)"
  14. 13 geta$:ifa$=""then13
  15. 14 ifa$<>"y"anda$<>"n"then13
  16. 15 ifa$="y"thenrun
  17. 16 print"[147]":sys58451:poke808,237:rem restore basic vectors & enable run/stop restore
  18. 17 print"[193]ll [196]one!";:goto17
  19. 18 print"[147]":dn$="":id$="":pn$="":pokern%,174:pokern%+1,167:pokeim%,180:pokeim%+1,2
  20. 19 rem poke address of boot, normalize basic warm start vector
  21. 20 printtab(3)"[208][204][197][193][211][197][160][201][206][211][197][210][212][160][196][201][211][203][160][212][207][160][194][197][160][198][207][210][205][193][212][212][197][196][146]":print
  22. 21 forc=s%toe%:readz%:pokec,z%:next
  23. 22 printtab(1)"** [193][204][204][160][196][193][212][193][160][207][206][160][196][201][211][203][160][215][201][204][204][160][194][197][160][197][210][193][211][197][196]![146] **"
  24. 23 print"";:input"[206][197][215][160][196][201][211][203][160][206][193][205][197]:[146] ";dn$
  25. 24 iflen(dn$)=0then23
  26. 25 print"";:input"[206][197][215][160][196][201][211][203][160][201][196]:[146] ";id$
  27. 26 iflen(id$)=0then25
  28. 27 print"[206]ame the program you want to [194]oot"
  29. 28 inputpn$
  30. 29 iflen(pn$)=0then28
  31. 30 gosub67:rem get string from input buffer and poke to filenam
  32. 31 print"[201]s ";pn$;"[146] a [194][193][211][201][195] program? (y/n)"
  33. 32 geta$:ifa$=""then32
  34. 33 ifa$<>"y"anda$<>"n"then32
  35. 34 ifa$="y"thenreturn:rem now get entry point of ml program
  36. 35 input"[215]hat is the [211][217][211] address:[146]";ad
  37. 36 ifad=<1orad>=mxthenprint"[207][213][212] [207][198] [210][193][206][199][197]![146]":forc=1to1000:next:print"";:goto35
  38. 37 pokern%,(ad-int(ad/256)*256):rem poke lo byte
  39. 38 pokern%+1,(ad/256):rem poke hi byte
  40. 39 printtab(4)"[193]re your entries correct? (y/n)"
  41. 40 geta$:ifa$=""then40
  42. 41 ifa$<>"y"anda$<>"n"then40
  43. 42 ifa$="n"thenrun
  44. 43 return
  45. 44 close15:open15,dv,15:rem error check
  46. 45 input#15,er,er$,t,s
  47. 46 return
  48. 47 gosub44:rem error check
  49. 48 iferthenprinttab(8)er;er$;t;s:print"[208][204][197][193][211][197] [208][207][215][197][210] [196][207][215][206][160]& [211][212][193][210][212] [207][214][197][210]!";:goto48
  50. 49 close15:open15,dv,15
  51. 50 print#15,"n0:"+dn$+","+id$:rem title new disk
  52. 51 close15
  53. 52 gosub44
  54. 53 iferthen48
  55. 54 close2:open2,dv,1,"0:[160]the magic boot,p,w":rem shifted space before title
  56. 55 print#2,chr$(s%-int(s%/256)*256);
  57. 56 print#2,chr$(s%/256);
  58. 57 fori=0tocs%-1
  59. 58 print#2,chr$(peek(s%+i));
  60. 59 next
  61. 60 close2
  62. 61 return
  63. 62 print"[147]";chr$(14):poke53280,1:poke53281,1
  64. 63 printtab(15)"[195]64 [194][207][207][212][197][210]"
  65. 64 printtab(6)"[195]opyright 1984 [199]eorge [202]ones"
  66. 65 fort=1to2000:next
  67. 66 return
  68. 67 forc=1tolen(pn$)
  69. 68 pokesr%,(peek(fi%))
  70. 69 sr%=sr%+1:fi%=fi%+1
  71. 70 next
  72. 71 pokelm%,len(pn$):rem set length of new program name
  73. 72 return
  74. 73 rem*****************************
  75. 74 rem  mx=65535 maximum address
  76. 75 rem  bs%=692 start of nuboot
  77. 76 rem  fi%=512 system input buffer
  78. 77 rem  cs%=80 no of bytes to save
  79. 78 rem  sr%=735 loc of file name
  80. 79 rem  rn%=733 interpreter loop &
  81. 80 rem  sys address for ml prog
  82. 81 rem  lm%=702 store len(pn$)
  83. 82 rem  im%=770 basic warm start vector
  84. 83 rem  pn$= program name
  85. 84 rem  dn$= disk name
  86. 85 rem  id$= disk id
  87. 86 rem****************************
  88. 87 data40,67,40,49,57,56,52,71,74,79,78,69,83,169,1,162
  89. 88 data8,160,1,32,186,255,169,15,162,223,160,2,32,189,255,169
  90. 89 data0,162,255,160,255,32,213,255,134,45,132,46,32,239,2,32
  91. 90 data83,228,32,89,166,76,174,167,160,160,160,160,160,160,160,160
  92. 91 data160,160,160,160,160,160,160,160,162,0,169,160,157,223,2,232
  93. 92 data224,16,208,246,141,189,2,96,0,139,227,180,2
  94. 93 rem 'c64 booter' copyright 1984 george jones * for c-64
  95.